.telemetry-display {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 280px;
  max-height: calc(100vh - 40px);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  overflow-y: auto;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.telemetry-header:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px;
  margin: -10px -10px 15px -10px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collapse-arrow {
  color: #00bfff;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.collapse-arrow.collapsed {
  transform: rotate(-90deg);
}

.telemetry-display.collapsed {
  height: auto;
}

.telemetry-content {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

.telemetry-header h3 {
  margin: 0;
  color: #00ff00;
  font-size: 14px;
}

.status-indicator {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

.status-indicator.flying {
  background: #4CAF50;
  color: white;
}

.status-indicator.grounded {
  background: #757575;
  color: white;
}

.telemetry-section {
  margin-bottom: 15px;
}

.telemetry-section h4 {
  margin: 0 0 8px 0;
  color: #00bfff;
  font-size: 12px;
  border-left: 3px solid #00bfff;
  padding-left: 8px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.telemetry-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.telemetry-item .label {
  color: #cccccc;
  font-size: 10px;
}

.telemetry-item .value {
  color: #00ff00;
  font-weight: bold;
  font-size: 11px;
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-label {
  min-width: 60px;
  font-size: 10px;
  color: #cccccc;
}

.progress-bar {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 6px;
}

.mission-progress-fill {
  background: linear-gradient(90deg, #00bfff, #0080ff);
}

.status-value {
  min-width: 35px;
  text-align: right;
  font-size: 10px;
  font-weight: bold;
}

.flight-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-indicator {
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  transition: all 0.3s ease;
}

.mode-indicator.active {
  background: rgba(0, 255, 0, 0.2);
  border: 1px solid #00ff00;
  color: #00ff00;
}

.mission-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mission-name {
  color: #00bfff;
  font-weight: bold;
  font-size: 11px;
}

.mission-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.mission-waypoint {
  color: #cccccc;
  font-size: 10px;
}

.compass {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.compass-circle {
  position: relative;
  width: 80px;
  height: 80px;
  border: 2px solid #00bfff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
}

.compass-needle {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 2px;
  height: 30px;
  background: #ff0000;
  transform-origin: bottom center;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}

.compass-needle::after {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 8px solid #ff0000;
}

.compass-directions {
  position: absolute;
  width: 100%;
  height: 100%;
}

.compass-n, .compass-e, .compass-s, .compass-w {
  position: absolute;
  font-size: 10px;
  font-weight: bold;
  color: #00bfff;
}

.compass-n { top: 2px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 2px; top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 2px; top: 50%; transform: translateY(-50%); }

.attitude-indicator {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.horizon {
  position: relative;
  width: 80px;
  height: 80px;
  border: 2px solid #00bfff;
  border-radius: 50%;
  background: linear-gradient(to bottom, #87CEEB 50%, #8B4513 50%);
  overflow: hidden;
}

.horizon-line {
  position: absolute;
  top: 50%;
  left: -20px;
  width: 120px;
  height: 2px;
  background: #ffffff;
  transform-origin: center;
  transition: transform 0.3s ease;
}

.aircraft-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffff00;
  font-size: 16px;
  z-index: 10;
}

/* Scrollbar styling */
.telemetry-display::-webkit-scrollbar {
  width: 4px;
}

.telemetry-display::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.telemetry-display::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .telemetry-display {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-height: none;
    margin: 10px 0;
    border-radius: 0;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }
}
